import {
	ADD_TODO,
	TOGGLE_TODO,
	REMOVE_TODO
} from './actionTypes.js';

let nextTodoId = 10;

export const addTodo = (text) => ({
	type: ADD_TODO,
	id: nextTodoId++,
	text: text
});

export const toggleTodo = (id) => ({
	type: TOGGLE_TODO,
	id: id
});

export const removeTodo = (id) => ({
	type: REMOVE_TODO,
	id: id
});